#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>

int main()
{
  FILE *fp = fopen("log.txt","w");
  if(fp == NULL)
  {
    perror("fopen");
    return 1;
  }
  pid_t id = getpid();
  while(1)
  {
    printf("I am a process, pid:%d\n",id);
    sleep(1);
  }
  return 0;

}
